home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / Kubuntu 8.10 / kubuntu-8.10-desktop-i386.iso / casper / filesystem.squashfs / var / lib / dpkg / info / dbus.preinst < prev    next >
Text File  |  2008-10-07  |  640b  |  30 lines

  1. #!/bin/sh
  2.  
  3. set -e
  4.  
  5. rm_conffile() {
  6.   CONFFILE="$1"
  7.   OLD_MD5SUM="$2"
  8.   if [ -e "$CONFFILE" ]; then
  9.    md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
  10.    if [ "$md5sum" != "$OLD_MD5SUM" ]; then
  11.      echo "Obsolete conffile $CONFFILE has been modified by you."
  12.      echo "Saving as $CONFFILE.dpkg-bak ..."
  13.      mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
  14.    else
  15.      echo "Removing obsolete conffile $CONFFILE ..."
  16.      rm -f "$CONFFILE"
  17.    fi
  18.  fi
  19. }
  20.  
  21. case "$1" in
  22. install|upgrade)
  23.   if dpkg --compare-versions "$2" lt "0.50-2"; then
  24.     rm_conffile "/etc/X11/Xsession.d/75dbus-1-utils_dbus-launch" f16c15c4b018d37ca3ea2b6aba224439
  25.   fi
  26. esac
  27.  
  28.  
  29.  
  30.